const mongoose = require("mongoose");
//店铺信息数据库
const schema = new mongoose.Schema(
  {
    fromId: { type: mongoose.SchemaTypes.ObjectId, ref: "User" },
    toId: { type: mongoose.SchemaTypes.ObjectId, ref: "User" },
    carId: { type: mongoose.SchemaTypes.ObjectId, ref: "Car" },
    mesage: { type: String },
    date: { type: String },
    time: { type: String },
    state: { type: Number, default: 0 },
    isVaild: { type: Boolean, default: true },
    notVaildMessage: { type: String },
  },
  {
    timestamps: true,
  }
);

module.exports = mongoose.model("Connect", schema);
